/* Réinitialisation basique */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* arrière plan */
  pointer-events: none;
}

.constellation {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

#moon {
  position: fixed;
  top: 5px;
  left: 5%;  /* Position initiale de la lune */
  width: 85px;
  height: 45px;
  background-image: url('/images/moon-image2.gif');
  background-size: contain;
  background-repeat: no-repeat;
  border-radius: 50%;
  filter: contrast(60%); 
  z-index: -1;
  pointer-events: none;
  animation: moonMove 650s linear infinite;
}

/* Animation pour un mouvement lent de la lune */
@keyframes moonMove {
  0% {
    transform: translateX(0);  /* rotate(0deg);Au départ, pas de rotation */
  }
  50% {
    transform: translateX(90vw);
  }
  100% {
    transform: translateX(0);
  }
}

#logo {
  position: fixed;
  top: 8px;
  left: 10%;  /* Position initiale de la lune */
  width: 50px;
  height: 50px;
  background-image: url('/images/mpe_logo0.png');
  background-size: contain;
  background-repeat: no-repeat;
  border-radius: 50%;
}

body {
  font-family: Arial, sans-serif;
  color: white;
  background: linear-gradient(to bottom, #14001f, #a266d9);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: 100% 100%;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

html, body {
  height: 100%;
  margin: 0;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1; /* pousse le footer vers le bas */
  /* margin-top: 60px; Ajuste selon la hauteur réelle du menu */
  /* margin: 2em 5em; > sinon s'applique à l'intro Accueil */
}

header {
  background: rgba(0, 0, 0, 0.4);
  padding: 1em 0;
  text-align: center;
  position: relative;
  /*z-index: 0; */
}
/* MENU */
/* Style de base pour le menu */
nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  /*background-color: #333; /* Couleur de fond du menu */
  position: relative;  /* Ajouté pour que le sous-menu se place par rapport à cet élément */
  z-index: 10; /* Assurer que le menu principal soit au-dessus des autres éléments */
}

nav li {
  position: relative;  /* Ajouter un positionnement relatif pour le sous-menu */
}

nav a {
  display: block;
  padding: 20px 20px;
  margin: 0 5px;
  color: white;
  text-decoration: none;
  font-size: 18px;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

nav a:hover {
  background-color: rgba(85, 85, 85, 0.8);
  transform: scale(1.05); /* Légère mise à l'échelle */
}

nav a:focus, .menu-item:focus {
  /* outline: 2px solid #ff6347; */
  background-color: rgba(85, 85, 85, 0.6);
}

/* Menu page plan */
  .sitemap-menu ul {
  list-style: none;
  padding: 0;
  flex-direction: column;  /* Afficher les éléments verticalement */
  margin: 0 30%;
}

.sitemap-menu > ul {
  display: flex;
}

.sitemap-menu li {
  margin: 10px 0;
}

.sitemap-menu .submenu {
  display: block;  /* Forcer l'ouverture des sous-menus */
}

.sitemap-menu .submenu li {
  margin-left: 20px;
}
/* Fin menu page plan */

/* Sous-menu : masqué par défaut */
.submenu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  background-color: rgba(0, 0, 0, 0.4); /*background-color: #333;*/
  min-width: 150px;
  position: absolute;
  top: 100%;
  left: 0;
  border-radius: 8px;
  z-index: 100;
  overflow: hidden; /* pour les coins arrondis */
}

/* Menu item avec flèche à gauche */
.menu-item > a {
  display: flex;
  align-items: center; /* Centre l'élément */
  gap: 8px; /* Espace entre la flèche et le texte */
}

/* Flèche SVG */
.arrow svg {
  transition: transform 0.3s ease;
  margin-right: 0; /* Annule les marges si présentes */
}

/* Rotation de la flèche au survol du menu */
.menu-item:hover .arrow svg {
  transform: rotate(180deg);
}

.menu-item:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Flèche menu déroulant */
.arrow {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

/* Rotation au survol du parent */
.menu-item:hover .arrow {
  transform: rotate(180deg);
}

#menu-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1000; /* Doit être plus élevé que les autres éléments */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optionnel : un peu d'ombre pour la séparation */
}

/* Style des liens dans le sous-menu */
.submenu li {
  text-align: left;
}

.submenu a {
  padding: 10px 15px;
  color: white;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s ease;
  border-radius: 0; /* optionnel si tu veux que tout reste carré à l’intérieur */
  white-space: nowrap;
}

.submenu a:hover {
  background-color: rgba(0, 0, 0, 0.4);
}

/* Bandeau en travers dans le sous-menu */
.submenu-item a {
  position: relative;
  /*display: inline-block;  pour que le bandeau suive la taille du lien */
}

.bandeau-wrapper {
  position: relative;
  display: inline-block;
  overflow: hidden; /* coupe ce qui dépasse */
}
.bandeau-wrapper a {
  display: inline-block;
  padding-right: 1em; /* espace pour que le texte ne chevauche pas le bandeau */
}

.bandeau-news {
  position: absolute;
  top: 5px;
  right: -50px;
  transform: rotate(35deg);
  background-color: #ff6347;
  color: white;
  font-size: 0.6em;
  font-weight: bold;
  padding: 0.2em 6em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
  border-radius: 5px;
}


/* Fin MENU */
/*  beandeau PROCHAINEMENT */
.bandeau-annonce {
  position: fixed;
  /*display: block;*/
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  background-color: rgba(251, 158, 158, 0.7);
  color: white;
  font-size: 2.5em;
  font-weight: bold;
  padding: 1em 4em;
  z-index: 2000;
  pointer-events: auto;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  width: 120vw;
  text-align: center;
}

/* CSS pour la croix de fermeture */
.fermer-bandeau {
  position: fixed;
  top: 1.2em;
  right: 5em;
  transform: none; /* rotate(30deg);  compense la rotation inverse du bandeau */
  font-size: 1.5em;
  cursor: pointer;
  color: white;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  padding: 0.2em 0.4em;
  z-index: 2001;
  border: 1px solid white;
}

.bandeau-annonce.hidden {
  display: none;
}

.confetti {
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: red;
  opacity: 0.9;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  animation: confetti-fall 1s ease-out forwards;
}

@keyframes confetti-fall {
  to {
    transform: translate(var(--dx), var(--dy)) rotate(720deg);
    opacity: 0;
  }
}

@keyframes bandeauFade {
  from {
    opacity: 0;
    transform: rotate(-30deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: rotate(-30deg) scale(1);
  }
}
/* Fin beandeau PROCHAINEMENT */

/* Section Introduction */
.intro {
  position: relative;
  text-align: center;
  padding: 5em 0;
  color: white;
  z-index: 2; /* section au-dessus du fond étoilé */
  /*background: rgba(0, 0, 0, 0.5);  Légère transparence pour le texte */
}

.intro h1 {
  font-size: 3em;
  margin-bottom: 0.5em;
}

.intro p {
  font-size: 1.5em;
  margin-bottom: 1em;
}

/* Centrer l’image */
.intro-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.intro-image img {
  max-width: 15%;
  height: auto;
  border-radius: 15px; /* Arrondir légèrement les bords */
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7); /* Ajouter une légère ombre */
}
/* Fin page Accueil */
.btn-voirplus {
  display: inline-block;
  padding: 10px 20px;
  background-color: #4a4a4a;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-voirplus:hover {
  background-color: #6c6c6c;
}

/* Carrousel */
    .carousel-container {
      position: relative;
      width: 50%;
	  margin: 15px auto;
      overflow: hidden;
      border-radius: 10px;
      box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
	  background-color: #000;
    }

	.slide {
	  display: none;
	  position: absolute;
	  width: 100%;
	  height: 100%;
	  transition: opacity 0.5s ease-in-out;
	  opacity: 0;
	}

	.slide.active {
	  display: block;
	  position: relative;
	  opacity: 1;
	  z-index: 1;
	}

    .slide img {
      position: relative;
      width: 100%;
      height: auto;
      max-height: 350px;
      object-fit: cover;
      border-radius: 10px;
    }
	
	.slide-title {
	  position: absolute;
	  top: 15px;
	  left: 15px;
	  color: #753edb;
	  font-size: 2.5em;
	  font-weight: bold;
      font-style: italic;
	  background-color: rgba(255, 255, 255, 0.3);
	  padding: 5px 10px;
	  border-radius: 6px;
	  z-index: 1;
	}

    .carousel-button {
	  position: absolute;
	  bottom: 10px;
	  right: 10px;
	  background-color: #6a4fa3;
	  color: white;
	  padding: 10px 20px;
	  text-decoration: none;
	  border-radius: 6px;
	  transition: background-color 0.3s;
	}


    .carousel-button:hover {
      background-color: #8c6edb;
    }

    .nav-button {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      font-size: 4em;
      background: none; /* rgba(0,0,0,0.5); */
      color: white;
      border: none;
      padding: 10px;
      cursor: pointer;
      border-radius: 50%;
      z-index: 10;
    }

    .nav-button.prev { left: 10px; }
    .nav-button.next { right: 10px; }

/* Fin carousel */
/*  Citations */
.quote-box {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 20px;
  margin-top: 20px;
  border-radius: 10px;
  width: 60%;
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
  text-align: center;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.quote-text {
  margin: 0;
  color: #d4af37; /* doré */
  font-size: 1.5em;
  font-family: 'Georgia', serif;
}

.quote-author {
  margin-top: 10px;
  margin-right: 15%;
  text-align: right;
  font-style: normal;
  font-weight: bold;
}
/* Fin Citations */

/* Page Créations */
.creations {
  padding: 4em 0;
  color: white;
  text-align: center;
}

/* Chaque création avec texte et image */
.creation {
  display: flex;
  justify-content: center; /* Centrer les éléments */
  align-items: center;  /* Aligner les éléments au centre verticalement */
  margin-bottom: 2em; /* Espacement entre chaque création */
  gap: 0; /* Supprimer l'espace entre l'image et le texte */
  flex-wrap: wrap;  /* Pour que ça soit responsive */
}

/* Texte à gauche, image à droite */
.creation-text {
  flex: 1;
  padding: 1em;  /* Ajouter un padding autour du texte pour ne pas être collé aux bords */
  text-align: left;
  margin-left: 20px;
  max-width: 600px; /* Limiter la largeur du texte pour garder l'équilibre */
  /*margin: 0;  Enlever la marge autour du texte pour rapprocher l'image */
  box-sizing: border-box;  /* Assurer que le padding n'affecte pas la largeur du conteneur */
}

.creation-image {
  flex: 0 1 250px; /* Limiter la taille de l'image pour qu'elle ne prenne pas trop de place */
  padding: 0;  /* Supprimer le padding autour de l'image */
  display: flex;
  justify-content: center;
  box-sizing: border-box;  /* Assurer que le padding n'affecte pas la largeur du conteneur */
}

.creation-image img {
  width: 100%; /* Assurer que l'image est responsive */
  height: auto;
  max-width: 250px; /* Limiter la largeur maximale de l'image */
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

/* Mise en page décalée */
.creation:nth-child(even) {
  flex-direction: row-reverse; /* Inverse la position texte/image pour les créations paires */
}

.creation h2 {
  font-size: 2em;
  margin-bottom: 0.5em; /* Réduire l'espace sous le titre */
}

.creation p {
  font-size: 1.2em;
  line-height: 1.6;
  margin-bottom: 0; /* Enlever les marges supplémentaires sous le paragraphe */
}
/* Fin page Créations */

/* page A Propos */
.about-us {
  display: flex;
  justify-content: space-between;
  padding: 2em;
  background-color: #f4f4f4;
  border-radius: 10px;
  margin: 100px 15% 40px;
}

.about-us-content {
  flex: 1;
  padding-right: 2em;
}

.about-us-content h1 {
  font-size: 2.5em;
  margin-bottom: 1em;
  color: #333; /* Gris foncé pour le titre */
}

.about-us-content p {
  font-size: 1.2em;
  line-height: 1.6;
  color: #555; /* Gris foncé pour le texte */
}

.about-us-image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  flex: 1;
}

/* Section Vision */
.vision {
  background-color: #fff;
  padding: 2em;
  border-radius: 10px;
  margin: 50px 15%;
}

.vision-content h2 {
  font-size: 2em;
  margin-bottom: 1em;
  color: #333; /* Gris foncé pour le texte */
}

.vision-content p {
  font-size: 1.2em;
  line-height: 1.6;
  color: #555;
}
/* Fin page a Propos */

/* Page Contact */

.contact {
  background-color: #f9f9f9;
  padding: 2em;
  border-radius: 10px;
  margin-top: 2em;
   margin: 2em 5em;
}

.contact-content h1 {
  font-size: 2.5em;
  margin-bottom: 1em;
  color: #333;
}

.contact-content p {
  font-size: 1.2em;
  margin-bottom: 2em;
  color: #555;
}

.contact form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 1em;
}

.form-group label {
  font-size: 1.1em;
  margin-bottom: 0.5em;
  color: black;
}

.form-group input, .form-group textarea {
  padding: 0.8em;
  font-size: 1em;
  border: 1px solid #ddd;
  border-radius: 5px;
  width: 80%;
}

form button {
  padding: 0.8em;
  font-size: 1.2em;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

form button:hover {
  background-color: #555;
}

#form-message {
  margin-top: 1em;
  font-size: 1.2em;
}
.form-response {
  margin-top: 1em;
  font-weight: bold;
}
/* Fin page contact */
/* Pied de page */
footer {
  margin-top: auto;
  background-color: rgba(0, 0, 0, 0.5);
  text-align: center;
  padding: 1em;
  font-size: 0.9em;
  position: relative;
  z-index: 1;
}

footer a {
  color: #ccc;
  text-decoration: underline;
}

footer a:hover {
  color: #fff;
}
/* MULTILANGUE */
.language-switcher {
  position: absolute;
  top: 1em;
  right: 1em;
  z-index: 100;
}

.language-switcher button {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: white;
  margin-left: 0.5em;
  padding: 0.3em 0.6em;
  cursor: pointer;
  font-size: 0.9em;
}

.language-switcher button:hover {
  background: rgba(255, 255, 255, 0.2);
}
/* Fin MULTILANGUE */

/* VERSION MOBILE */
/* Par défaut, le menu est en mode horizontal */

.menu-toggle {
  display: none;
  font-size: 2em;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  position: absolute;
  top: 1em;
  left: 1em;
  z-index: 20;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block; /* Afficher le menu burger */
  }
  
  .menu-toggle.active {
  transform: rotate(90deg); /* Rotation de l'icône pour l'effet de transformation */
  }

  nav ul {
    display: none; /* Masquer le menu par défaut sur mobile */
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.9);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
  }

  nav ul.active {
    display: flex; /* Afficher le menu quand la classe "active" est ajoutée */
  }

  nav li {
    width: 100%;
    text-align: center;
  }

  .submenu {
    display: none;
  }

  .menu-item.open .submenu {
    display: block;
  }
}
